package com.kgc.scd.service.impl;

import com.kgc.scd.bean.VipOrder;
import com.kgc.scd.mapper.VipOrderMapper;
import com.kgc.scd.service.BuyVipService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created On : 2022/6/17.
 * <p>
 * Author     : 15950526365
 * <p>
 * Description: BuyVipServiceImpl
 */
@Service
public class BuyVipServiceImpl implements BuyVipService {

    @Autowired(required = false)
    private VipOrderMapper vipOrderMapper;

    @Override
    public boolean addVipOrder(String vipOrderId,String userId) {
        VipOrder vipOrder = VipOrder.builder()
                .vipOrderid(vipOrderId)
                .vipUserid(userId).build();
        return vipOrderMapper.insertSelective(vipOrder) > 0;
    }
}
